﻿function CategoryTitleValid(name, description)
{
    var rName = new RegExp("[0-9a-zA-Z]");
    if (!rName.exec(name))
    {
        return 10;
    }
    else if (name.length > 2000)
    {
        return 11;
    }
    else if (description.length > 2000)
    {
        return 20;
    }

    return 1;
}